Termination w.r.t. Q of the following Term Rewriting System could be proven:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
ACTIVE(filter(cons(X, Y), 0, M)) → FILTER(Y, M, M)
ACTIVE(nats(N)) → CONS(N, nats(s(N)))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
SIEVE(mark(X)) → SIEVE(X)
ACTIVE(sieve(cons(s(N), Y))) → FILTER(Y, N, N)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
NATS(mark(X)) → NATS(X)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X2)
ACTIVE(zprimes) → S(0)
FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
PROPER(nats(X)) → NATS(proper(X))
ACTIVE(filter(X1, X2, X3)) → FILTER(X1, active(X2), X3)
ACTIVE(sieve(cons(s(N), Y))) → CONS(s(N), sieve(filter(Y, N, N)))
PROPER(s(X)) → S(proper(X))
PROPER(filter(X1, X2, X3)) → PROPER(X3)
ACTIVE(sieve(cons(0, Y))) → SIEVE(Y)
ACTIVE(nats(X)) → NATS(active(X))
ACTIVE(zprimes) → SIEVE(nats(s(s(0))))
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(nats(X)) → ACTIVE(X)
ACTIVE(zprimes) → S(s(0))
PROPER(filter(X1, X2, X3)) → FILTER(proper(X1), proper(X2), proper(X3))
ACTIVE(zprimes) → NATS(s(s(0)))
S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(filter(cons(X, Y), s(N), M)) → FILTER(Y, N, M)
TOP(mark(X)) → PROPER(X)
ACTIVE(filter(X1, X2, X3)) → FILTER(active(X1), X2, X3)
ACTIVE(nats(N)) → NATS(s(N))
ACTIVE(sieve(X)) → SIEVE(active(X))
ACTIVE(sieve(X)) → ACTIVE(X)
ACTIVE(filter(cons(X, Y), s(N), M)) → CONS(X, filter(Y, N, M))
SIEVE(ok(X)) → SIEVE(X)
TOP(ok(X)) → ACTIVE(X)
PROPER(sieve(X)) → SIEVE(proper(X))
PROPER(filter(X1, X2, X3)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X3)
PROPER(filter(X1, X2, X3)) → PROPER(X2)
ACTIVE(filter(cons(X, Y), 0, M)) → CONS(0, filter(Y, M, M))
ACTIVE(sieve(cons(0, Y))) → CONS(0, sieve(Y))
TOP(ok(X)) → TOP(active(X))
ACTIVE(filter(X1, X2, X3)) → FILTER(X1, X2, active(X3))
PROPER(sieve(X)) → PROPER(X)
PROPER(nats(X)) → PROPER(X)
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)
ACTIVE(sieve(cons(s(N), Y))) → SIEVE(filter(Y, N, N))
NATS(ok(X)) → NATS(X)
ACTIVE(nats(N)) → S(N)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
ACTIVE(filter(cons(X, Y), 0, M)) → FILTER(Y, M, M)
ACTIVE(nats(N)) → CONS(N, nats(s(N)))
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
SIEVE(mark(X)) → SIEVE(X)
ACTIVE(sieve(cons(s(N), Y))) → FILTER(Y, N, N)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
NATS(mark(X)) → NATS(X)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X2)
ACTIVE(zprimes) → S(0)
FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
PROPER(nats(X)) → NATS(proper(X))
ACTIVE(filter(X1, X2, X3)) → FILTER(X1, active(X2), X3)
ACTIVE(sieve(cons(s(N), Y))) → CONS(s(N), sieve(filter(Y, N, N)))
PROPER(s(X)) → S(proper(X))
PROPER(filter(X1, X2, X3)) → PROPER(X3)
ACTIVE(sieve(cons(0, Y))) → SIEVE(Y)
ACTIVE(nats(X)) → NATS(active(X))
ACTIVE(zprimes) → SIEVE(nats(s(s(0))))
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(nats(X)) → ACTIVE(X)
ACTIVE(zprimes) → S(s(0))
PROPER(filter(X1, X2, X3)) → FILTER(proper(X1), proper(X2), proper(X3))
ACTIVE(zprimes) → NATS(s(s(0)))
S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(filter(cons(X, Y), s(N), M)) → FILTER(Y, N, M)
TOP(mark(X)) → PROPER(X)
ACTIVE(filter(X1, X2, X3)) → FILTER(active(X1), X2, X3)
ACTIVE(nats(N)) → NATS(s(N))
ACTIVE(sieve(X)) → SIEVE(active(X))
ACTIVE(sieve(X)) → ACTIVE(X)
ACTIVE(filter(cons(X, Y), s(N), M)) → CONS(X, filter(Y, N, M))
SIEVE(ok(X)) → SIEVE(X)
TOP(ok(X)) → ACTIVE(X)
PROPER(sieve(X)) → SIEVE(proper(X))
PROPER(filter(X1, X2, X3)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X3)
PROPER(filter(X1, X2, X3)) → PROPER(X2)
ACTIVE(filter(cons(X, Y), 0, M)) → CONS(0, filter(Y, M, M))
ACTIVE(sieve(cons(0, Y))) → CONS(0, sieve(Y))
TOP(ok(X)) → TOP(active(X))
ACTIVE(filter(X1, X2, X3)) → FILTER(X1, X2, active(X3))
PROPER(sieve(X)) → PROPER(X)
PROPER(nats(X)) → PROPER(X)
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)
ACTIVE(sieve(cons(s(N), Y))) → SIEVE(filter(Y, N, N))
NATS(ok(X)) → NATS(X)
ACTIVE(nats(N)) → S(N)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 8 SCCs with 30 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATS(mark(X)) → NATS(X)
NATS(ok(X)) → NATS(X)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

NATS(mark(X)) → NATS(X)
NATS(ok(X)) → NATS(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SIEVE(mark(X)) → SIEVE(X)
SIEVE(ok(X)) → SIEVE(X)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

SIEVE(mark(X)) → SIEVE(X)
SIEVE(ok(X)) → SIEVE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

FILTER(X1, mark(X2), X3) → FILTER(X1, X2, X3)
FILTER(ok(X1), ok(X2), ok(X3)) → FILTER(X1, X2, X3)
FILTER(X1, X2, mark(X3)) → FILTER(X1, X2, X3)
FILTER(mark(X1), X2, X3) → FILTER(X1, X2, X3)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(nats(X)) → PROPER(X)
PROPER(filter(X1, X2, X3)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(filter(X1, X2, X3)) → PROPER(X2)
PROPER(filter(X1, X2, X3)) → PROPER(X3)
PROPER(sieve(X)) → PROPER(X)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(nats(X)) → PROPER(X)
PROPER(filter(X1, X2, X3)) → PROPER(X1)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(filter(X1, X2, X3)) → PROPER(X2)
PROPER(filter(X1, X2, X3)) → PROPER(X3)
PROPER(sieve(X)) → PROPER(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(filter(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X2)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(nats(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X3)
ACTIVE(sieve(X)) → ACTIVE(X)

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesProof
QDP
                ↳ QDPSizeChangeProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(filter(X1, X2, X3)) → ACTIVE(X2)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X1)
ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(nats(X)) → ACTIVE(X)
ACTIVE(filter(X1, X2, X3)) → ACTIVE(X3)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(sieve(X)) → ACTIVE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
QDP
            ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(mark(X)) → mark(s(X))
sieve(mark(X)) → mark(sieve(X))
nats(mark(X)) → mark(nats(X))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
s(ok(X)) → ok(s(X))
sieve(ok(X)) → ok(sieve(X))
nats(ok(X)) → ok(nats(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

No rules are removed from R.

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(filter(x1, x2, x3)) = x1 + x2 + 2·x3   
POL(mark(x1)) = x1   
POL(nats(x1)) = 2·x1   
POL(ok(x1)) = 2·x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(sieve(x1)) = 2·x1   
POL(zprimes) = 0   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
QDP
                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
nats(mark(X)) → mark(nats(X))
nats(ok(X)) → ok(nats(X))
sieve(mark(X)) → mark(sieve(X))
sieve(ok(X)) → ok(sieve(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(mark(X)) → TOP(proper(X))
The remaining pairs can at least be oriented weakly.

TOP(ok(X)) → TOP(active(X))
Used ordering: Combined order from the following AFS and order.
TOP(x1)  =  TOP(x1)
mark(x1)  =  mark(x1)
proper(x1)  =  x1
ok(x1)  =  x1
active(x1)  =  x1
filter(x1, x2, x3)  =  filter(x1, x2, x3)
cons(x1, x2)  =  cons(x1)
s(x1)  =  x1
sieve(x1)  =  sieve(x1)
nats(x1)  =  nats(x1)
zprimes  =  zprimes
0  =  0

Recursive path order with status [2].
Quasi-Precedence:
filter3 > [cons1, sieve1] > [mark1, 0]
zprimes > nats1 > [cons1, sieve1] > [mark1, 0]

Status:
cons1: [1]
filter3: [1,3,2]
nats1: [1]
mark1: [1]
TOP1: multiset
0: multiset
zprimes: multiset
sieve1: [1]


The following usable rules [17] were oriented:

filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
cons(mark(X1), X2) → mark(cons(X1, X2))
s(ok(X)) → ok(s(X))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
sieve(mark(X)) → mark(sieve(X))
nats(ok(X)) → ok(nats(X))
s(mark(X)) → mark(s(X))
sieve(ok(X)) → ok(sieve(X))
active(sieve(X)) → sieve(active(X))
active(s(X)) → s(active(X))
nats(mark(X)) → mark(nats(X))
active(nats(X)) → nats(active(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
QDP
                    ↳ UsableRulesReductionPairsProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(zprimes) → mark(sieve(nats(s(s(0)))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
nats(mark(X)) → mark(nats(X))
nats(ok(X)) → ok(nats(X))
sieve(mark(X)) → mark(sieve(X))
sieve(ok(X)) → ok(sieve(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))
proper(filter(X1, X2, X3)) → filter(proper(X1), proper(X2), proper(X3))
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(s(X)) → s(proper(X))
proper(sieve(X)) → sieve(proper(X))
proper(nats(X)) → nats(proper(X))
proper(zprimes) → ok(zprimes)

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the usable rules with reduction pair processor [15] with a polynomial ordering [25], all dependency pairs and the corresponding usable rules [17] can be oriented non-strictly. All non-usable rules are removed, and those dependency pairs and usable rules that have been oriented strictly or contain non-usable symbols in their left-hand side are removed as well.

No dependency pairs are removed.

The following rules are removed from R:

active(sieve(cons(0, Y))) → mark(cons(0, sieve(Y)))
active(zprimes) → mark(sieve(nats(s(s(0)))))
Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 1   
POL(TOP(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(filter(x1, x2, x3)) = 2·x1 + x2 + 2·x3   
POL(mark(x1)) = x1   
POL(nats(x1)) = 2·x1   
POL(ok(x1)) = 2·x1   
POL(s(x1)) = x1   
POL(sieve(x1)) = 2·x1   
POL(zprimes) = 2   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ UsableRulesReductionPairsProof
QDP
                        ↳ RuleRemovalProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
nats(mark(X)) → mark(nats(X))
nats(ok(X)) → ok(nats(X))
sieve(mark(X)) → mark(sieve(X))
sieve(ok(X)) → ok(sieve(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the rule removal processor [15] with the following polynomial ordering [25], at least one Dependency Pair or term rewrite system rule of this QDP problem can be strictly oriented.
Strictly oriented dependency pairs:

TOP(ok(X)) → TOP(active(X))

Strictly oriented rules of the TRS R:

nats(ok(X)) → ok(nats(X))
sieve(ok(X)) → ok(sieve(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
filter(ok(X1), ok(X2), ok(X3)) → ok(filter(X1, X2, X3))

Used ordering: POLO with Polynomial interpretation [25]:

POL(0) = 0   
POL(TOP(x1)) = 2·x1   
POL(active(x1)) = 2·x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(filter(x1, x2, x3)) = x1 + x2 + 2·x3   
POL(mark(x1)) = x1   
POL(nats(x1)) = 2·x1   
POL(ok(x1)) = 1 + 2·x1   
POL(s(x1)) = x1   
POL(sieve(x1)) = 2·x1   



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ UsableRulesReductionPairsProof
              ↳ QDP
                ↳ QDPOrderProof
                  ↳ QDP
                    ↳ UsableRulesReductionPairsProof
                      ↳ QDP
                        ↳ RuleRemovalProof
QDP
                            ↳ PisEmptyProof

Q DP problem:
P is empty.
The TRS R consists of the following rules:

active(filter(cons(X, Y), 0, M)) → mark(cons(0, filter(Y, M, M)))
active(filter(cons(X, Y), s(N), M)) → mark(cons(X, filter(Y, N, M)))
active(sieve(cons(s(N), Y))) → mark(cons(s(N), sieve(filter(Y, N, N))))
active(nats(N)) → mark(cons(N, nats(s(N))))
active(filter(X1, X2, X3)) → filter(active(X1), X2, X3)
active(filter(X1, X2, X3)) → filter(X1, active(X2), X3)
active(filter(X1, X2, X3)) → filter(X1, X2, active(X3))
active(cons(X1, X2)) → cons(active(X1), X2)
active(s(X)) → s(active(X))
active(sieve(X)) → sieve(active(X))
active(nats(X)) → nats(active(X))
nats(mark(X)) → mark(nats(X))
sieve(mark(X)) → mark(sieve(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
filter(mark(X1), X2, X3) → mark(filter(X1, X2, X3))
filter(X1, mark(X2), X3) → mark(filter(X1, X2, X3))
filter(X1, X2, mark(X3)) → mark(filter(X1, X2, X3))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.